Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump netlayer to use tor binary from tor browser v10.0 #4604

Merged

Conversation

cd2357
Copy link
Contributor

@cd2357 cd2357 commented Oct 6, 2020

Variant of #4601 which is based on tor-browser v10.0 (instead of v9.5.4 used in that PR).

Use a netlayer version that includes tor binaries extracted from the latest tor browser v10.0.

For simplicity:

  • use netlayer version cc80787 (based on commit cc80787 from this branch)
    • the referenced branch = previously used netlayer v0.6.8 + the following change to tor-binary
  • above netlayer bumps tor-binary dependency to 3dbd395 (based on commit 3dbd395 from this branch)
    • the referenced branch = previously used tor-binary dependency + change A + change B
      • change A: extract tor binaries from tor-browser v10.0 (instead of 9.5.3 used previously)
      • change B: update the extraction and build process to check if the SHA-256 hashes of the tor-browser binaries match the official ones (instead of SHA-512 hashes used previously, which are not published in the official tor repo anymore)
        • this ensures the build only succeeds if the downloaded tor-browser binaries (used to extract the tor binaries) match the official checksums

tor-browser v10.0 updates the tor binaries to v0.4.4.5 as per the tor browser v10 changelog. Currently, Bisq uses the tor binary extracted from tor-browser v9.5.3, which is tor v0.4.3.6 (as per the tor browser v9.5 changelog)

In other words:

Fixes #4593

Upgrade netlayer to a version that uses tor binaries extracted from the latest tor-browser v10.0.
Copy link
Contributor

@chimp1984 chimp1984 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@chimp1984
Copy link
Contributor

I dont have any preference here related to the other PR. @cd2357 Which do you recommend?

@cd2357
Copy link
Contributor Author

cd2357 commented Oct 6, 2020

The other PR is more conservative (tor browser 9.5.3 -> 9.5.4), this one more aggressive (9.5.3 -> 10.0).

But since tor browser 9.5.4 will be the last one from the 9.5 branch (as per release notes), it means only 10.x will receive patches and updates from now on.

Which means we'll have to switch to the 10.0 binaries sooner or later anyway. So we might as well do it now.

So I'd suggest this PR over #4601.

@ripcurlx
Copy link
Contributor

ripcurlx commented Oct 7, 2020

@cd2357 On which OS did you test the new binaries?

Works on macOS 10.15.6

@cd2357
Copy link
Contributor Author

cd2357 commented Oct 7, 2020

@cd2357 On which OS did you test the new binaries?

I tested this PR on macOS 10.15.6 + Windows 10 + Debian 10.6, where tested = started the desktop app, synchronized DAO to latest state, browsed around a bit.

@freimair
Copy link
Member

freimair commented Oct 7, 2020

the tor browser version is of no interest at all to bisq or the netlayer or the tor-binary project. The only reason to use the tor browser binaries in the first place was that the tor guys released signed versions of these binaries - hence, we have a trusted source of tor binaries. There has not been any other source of plain tor binaries. This is also why we do not have tor for ARM in there yet, despite JesusMcCloud/tor-binary#3.

That being said, @cd2357 can we trust you that you verified every and all signatures prior to injecting the sha256 sums? did anyone check if cd2357 did?

@cd2357
Copy link
Contributor Author

cd2357 commented Oct 7, 2020

the tor browser version is of no interest at all to bisq or the netlayer or the tor-binary project. The only reason to use the tor browser binaries in the first place was that the tor guys released signed versions of these binaries - hence, we have a trusted source of tor binaries.

Yes.

Currently there was no way to check if the tor binaries used in Bisq were the ones extracted from authenticated tor browser binaries, because:

  • current tor binaries used in Bisq are extracted from tor-browser 9.5.3 (for which binaries or hashes are not provided anymore on the official website)
  • the build process which processed those tor-browsers to extract the tor binaries relied on SHA-512, and there are no published SHA-512 hashes for any official tor-browser binary

Therefore, to establish some sort of proof that our jars are built from binaries from the official tor-browser binaries, I forked tor-binary and netlayer (links to branches and jitback builds in PR description above), plus modified the process to check the published SHA-256 hashes.

That being said, @cd2357 can we trust you that you verified every and all signatures prior to injecting the sha256 sums? did anyone check if cd2357 did?

Don't trust, verify :)

The commited hashes should match the ones from the published hash list, which should match the list signature linked above.

Copy link
Contributor

@ripcurlx ripcurlx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

Tested it on macOS Mainnet and verified all hashes with the public hashes provided by the tor project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Extend build script with ability to verify tor binaries delivered with netlayer
4 participants